package com.cupdata.zicon.my.proxy;

import org.junit.Test;

/**
 * 自定义动态代理
 */
public class MyProxyTest {

    @Test
    public void myProxyTest(){
        MyAOPMethodImpl myAOPMethod = new MyAOPMethodImpl();
        BizClass o = (BizClass)Proxy.newInstance(this.getClass().getClassLoader(), new DefaultAOPProxyImpl(new BizClassImpl(), myAOPMethod), BizClass.class);
        System.out.println(o.getStr());
    }
}
